import Vue from "vue";
import VueRouter from "vue-router";

// 告诉 vue 使用 vueRouter
Vue.use(VueRouter);


var router =  new VueRouter({
    routes:[
        // {
        //     path:"/404",
        //     component: resolve => require(['./pages/404.vue'],resolve),
        //     meta:{
        //         title:'页面找不到了',
        //         keepAlive: true
        //     }
        // },
        // {
        //     path:"/home",
        //     component: resolve => require(['./pages/Home.vue'],resolve),
        //     meta:{
        //         title:'首页',
        //         keepAlive: true
        //     }
        // },
        {
            path:"/loaninfo",
            component: resolve => require(['./pages/LoanInfo.vue'],resolve),
            meta:{
                title:'贷款详情',
                keepAlive: false
            }
        },
        {
            path:"/cardinfo",
            component: resolve => require(['./pages/CardInfo.vue'],resolve),
            meta:{
                title:'信用卡详情',
                keepAlive: false
            }
        },
        {
            path:"/presentation",
            component: resolve => require(['./pages/Presentation.vue'],resolve),
            meta:{
                title:'有度征信报告',
                keepAlive: false
            }
        },
        {
            path:"/appdownload",
            component: resolve => require(['./pages/AppDownload.vue'],resolve),
            meta:{
                title:'有度介绍-下载',
                keepAlive: true //页面是否缓存
            }
        },
        //404页面
        {
            path: "*",
            redirect: "/home",
            meta:{
                title:'首页'
            }
        }
    ]
})
export default router;







